//
//  WBDemoViewController.swift
//  WeiBoApp
//
//  Created by CrazyHacker on 16/6/29.
//  Copyright © 2016年 CrazyHacker. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        pushNextControllrt()
        title =  "第\(navigationController?.childViewControllers.count ?? 0)页"
    }
    
    @objc private func pushNext() {
    let vc = WBDemoViewController()
    
    navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController {
    private func pushNextControllrt() {
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一页", target: self, action: #selector(pushNext))
    }
    
}
